package com.my.chapter12;

public class practice8 {
    static void f(){
        throw new NullPointerException();
    }
    static void g() throws NullPointerException{
        throw new NullPointerException();
    }

    public static void main(String[] args) {
        try{
            f();
        }catch (Exception e){
            System.out.println("NullPointerException");
        }

        try {
            g();
        }catch (Exception e){
            System.out.println("NullPointerException");
        }
    }
}
